<?php
	// Conexao
    $sql_connect = mysql_connect("localhost", "root", "tvcb") or die ("no DB Connection");
    mysql_select_db("gameon") or die ("DB not found");
	
	// Pega do unity
    $idLogin = $_POST['idLogin'];
	
    $query = "SELECT * FROM personagem where codLogin = '$idLogin' ";
	$result = mysql_query($query);
        
    $num_results = mysql_num_rows($result);  
 
    If($num_results > 0){
		$row = mysql_fetch_array($result);
		echo $row['tipoLogin'];
	} 
	Else { 
		echo 0; 
	}
   	
    mysql_close($sql_connect);
?>